package _designPatterm.备忘录模式;

import java.util.ArrayList;
import java.util.List;

public class Caretaker {
    //list集合中存放备忘录对象
    private List<Memento> mementoList = new ArrayList<Memento>();

    public void add(Memento memento) {
        mementoList.add(memento);
    }

    public Memento get(int index) {
        Memento memento = mementoList.get(index);
        return memento;
    }
}
